const key = 'screenKey'

export function getScreenItem() {
  let val = localStorage.getItem(key);
  try {
    //如果是number boolean jsonstring是不会报错的
    return JSON.parse(val);
  } catch (e) {
    return val;
  }
  
}

export function setScreenItem(val) {
 
  return localStorage.setItem(key, JSON.stringify(val))
}

export function removeScreenItem() {
  return localStorage.removeItem(key)
}